-
Notifications
You must be signed in to change notification settings - Fork 1
Refactor/51 커뮤니티 게시글 id로 조회 로직 QueryDSL로 변경 #54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
m-a-king
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수고하셨습니다!
| public interface CommunityBoardRepository { | ||
| CommunityBoard save(CommunityBoard communityBoard); | ||
| Optional<CommunityBoard> findById(Long id); | ||
| Optional<CommunityBoard> getCommunityBoardWithId(Long id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- repository에서 find 키워드를 더 많이 사용하지 않나요?
- CommunityBoardRepository라면 findById만 사용하면 되지 않나요?
| Optional<CommunityBoard> getCommunityBoardWithId(Long id); | |
| Optional<CommunityBoard> findById(Long id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2번 설명이 좀 부족했는데, get을 사용하더라도
getById()
getWithId() 로 처리 가능하지 않은지 여쭤본 겁니다!
leebs0521
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
…getCommunityBoardsByWriterId -> findByWriterId 이름 변경
|



resolved :
📌 과제 설명
findById 조회 기능 JPA -> QueryDSL
👩💻 요구 사항과 구현 내용
✅ PR 포인트 & 궁금한 점
삭제된 게시글의 경우에도 조회가 되어 QueryDSL로 deleted 조건 추가하였습니다.